class elastic:
    name = "elastic"
    xml = '''
        <mat constitutive="elastic">
            <volume_weight value=19 unit="kN/m^3" />
            <friction_angle value=30 unit="degree" />
            <dilation_angle value=30 unit="degree" />
            <cohesion value=10 unit="kPa" />
            <perm_x1 value=1e-05 unit="m/day" />
            <perm_x2 value=1e-05 unit="m/day" />
            <perm_x3 value=1e-05 unit="m/day" />
            <zeta value=0.1 unit="-" />
            <k_ic value=2.9 unit="kN/m^0.5" />
            <elastic_modulus value=1e6 unit="kPa" />
            <elastic_poisson value=0.3 unit="-" />
        </mat>
        '''

    json = {
        "id": 0,
        "type": "elastic",
        "volume_weight": 19,
        "friction_angle": 30,
        "dilation_angle": 30,
        "cohesion": 10,
        "permeability": [1e-5, 1e-5, 1e-05],
        "zeta": 0.1,
        "K_IC": 2.9,
        "elastic_modulus": 1e6,
        "elastic_poisson": 0.3
    }


class DuncanChang:
    name = "DuncanChang"

    xml = '''
        <mat constitutive="DuncanChang">
            <volume_weight value=19 unit="kN/m^3" />
            <friction_angle value=30 unit="degree" />
            <dilation_angle value=30 unit="degree" />
            <cohesion value=10 unit="kPa" />
            <perm_x1 value=1e-05 unit="m/day" />
            <perm_x2 value=1e-05 unit="m/day" />
            <perm_x3 value=1e-05 unit="m/day" />
            <zeta value=0.1 unit="-" />
            <k_ic value=2.9 unit="kN/m^0.5" />
            <elastic_modulus value=1e6 unit="kPa" />
            <elastic_poisson value=0.3 unit="-" />
            <rf value=201 />
            <k value=202 />
            <n value=203 />
            <g value=204 />
            <f value=205 />
            <d value=206 />
        </mat>
       '''

    json = {
        "id": "0",
        "type": "DuncanChang",
        "volume_weight": 19,
        "friction_angle": 30,
        "dilation_angle": 30,
        "cohesion": 10,
        "permeability": [1e-5, 1e-5, 1e-05],
        "zeta": 0.1,
        "K_IC": 2.9,
        "elastic_modulus": 1e6,
        "elastic_poisson": 0.3,
        "Rf": 201,
        "K": 202,
        "n": 203,
        "G": 204,
        "F": 205,
        "D": 206
    }


class CamClay:
    name = "CamClay"

    xml = '''
        <mat constitutive="CamClay">
            <volume_weight value=19 unit="kN/m^3" />
            <friction_angle value=30 unit="degree" />
            <dilation_angle value=30 unit="degree" />
            <cohesion value=10 unit="kPa" />
            <perm_x1 value=1e-05 unit="m/day" />
            <perm_x2 value=1e-05 unit="m/day" />
            <perm_x3 value=1e-05 unit="m/day" />
            <zeta value=0.1 unit="-" />
            <k_ic value=2.9 unit="kN/m^0.5" />
            <elastic_modulus value=1e6 unit="kPa" />
            <elastic_poisson value=0.3 unit="-" />
            <swelling_slope value=201 />
            <normal_compress_slope value=202 />
            <initial_void value=203 />
        </mat>
        '''

    json = {
        "id": 0,
        "type": "CamClay",
        "volume_weight": 19,
        "friction_angle": 30,
        "dilation_angle": 30,
        "cohesion": 10,
        "permeability": [1e-5, 1e-5, 1e-05],
        "zeta": 0.1,
        "K_IC": 2.9,
        "elastic_modulus": 1e6,
        "elastic_poisson": 0.3,
        "swelling_slope": 201,
        "normal_compress_slope": 202,
        "initial_void": 203
    }


class DruckPrager:
    name = "DruckPrager"

    xml = '''
        <mat constitutive="DruckPrager">
            <volume_weight value=19 unit="kN/m^3" />
            <friction_angle value=30 unit="degree" />
            <dilation_angle value=30 unit="degree" />
            <cohesion value=10 unit="kPa" />
            <perm_x1 value=1e-05 unit="m/day" />
            <perm_x2 value=1e-05 unit="m/day" />
            <perm_x3 value=1e-05 unit="m/day" />
            <zeta value=0.1 unit="-" />
            <k_ic value=2.9 unit="kN/m^0.5" />
            <elastic_modulus value=1e6 unit="kPa" />
            <elastic_poisson value=0.3 unit="-" />
            <qf value=201 />
            <kf value=202 />
            <q_dilantion value=203 />
        </mat>
        '''

    json = {
        "id": 0,
        "type": "DruckPrager",
        "volume_weight": 19,
        "friction_angle": 30,
        "dilation_angle": 30,
        "cohesion": 10,
        "permeability": [1e-5, 1e-5, 1e-05],
        "zeta": 0.1,
        "K_IC": 2.9,
        "elastic_modulus": 1e6,
        "elastic_poisson": 0.3,
        "qf": 201,
        "kf": 202,
        "q_dilantion": 203
    }
